package com.xjh.utils.beanutils.internal.convertors;

import com.xjh.utils.beanutils.BeanCopyConvertor;

/**
 * int对象数组转换器
 *
 * @company 湖南省安第斯信息科技有限公司, 版权所有
 * @author kevin
 * @date 2021/3/10
 */
@SuppressWarnings("rawtypes")
public class IntObjectArrayConvertor implements BeanCopyConvertor {

	@Override
	public Object convertTo(Object object) {
		Integer[] array = (Integer[]) object;
		int[] retObject = new int[array.length];
		
		for( int i=0;i< array.length; i++) {
			retObject[i] = array[i].intValue();
		}
		return retObject;
	}

}
